package com.atguigu.teach.mytask;

import com.atguigu.teach.bean.Person;

public class MyTestTransferValue {
    public void changeValue1(int age){
        age=30;
    }
    public void changeValue2(Person person){
        person.setPersonname("xxx");
    }
    public void changeValue3(String str){
        str="xxx";
    }

    public static void main(String[] args) {
        MyTestTransferValue test = new MyTestTransferValue();
        int age=20;
        test.changeValue1(age);
        System.out.println("age = " + age);

        Person person=new Person("abc");
        test.changeValue2(person);
        System.out.println("personName = " + person.getPersonname());

        String str="abc";
        test.changeValue3(str);
        System.out.println("str = " + str);
    }
}
